package cn.jetpiece.cloud.pay.app;

import cn.jetpiece.cloud.pay.app.config.StartupRunner;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 启动器
 * @author XuJZ
 */
@Slf4j
@EnableFeignClients
@EnableScheduling
@EnableDiscoveryClient
@SpringBootApplication(exclude = {DruidDataSourceAutoConfigure.class},scanBasePackages = "cn.jetpiece.cloud")
public class JetpiecePayApp {

    public static void main(String[] args) {
        /* 解决Druid 日志问题 */
        System.setProperty("druid.mysql.usePingMethod", "false");
        SpringApplication.run(JetpiecePayApp.class, args);
        log.info("支付服务启动成功！");
    }
    @Bean
    public StartupRunner startupRunner() {
        return new StartupRunner();
    }
}
